<?php /* Smarty version 2.6.14, created on 2015-04-13 10:41:13
         compiled from datasummary.showchannel.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'datasummary.showchannel.html', 43, false),array('modifier', 'string_format', 'datasummary.showchannel.html', 83, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<dl class="adminoption">
    <dt></dt>
    <dd><a href="/datasummary/showgame/"><?php echo $this->_tpl_vars['systemLang']['showGame']; ?>
</a></dd>
    <dd><a href="/datasummary/show/"><?php echo $this->_tpl_vars['systemLang']['showDate']; ?>
</a></dd>
    <dd><a href="/datasummary/showchannel/"  <?php if ($this->_tpl_vars['formAction'] == '/datasummary/showchannel'): ?> style="color:#00ba35" <?php endif; ?>><?php echo $this->_tpl_vars['systemLang']['showChannel']; ?>
</a></dd>
</dl>
<form action="<?php echo $this->_tpl_vars['formAction']; ?>
" method="POST" <?php if ($this->_tpl_vars['is_validator']): ?> id="adminform" onsubmit="return Validator.Validate(this)" <?php endif; ?>>
<link rel="stylesheet" type="text/css" href="<?php echo @BASEURI; ?>
public/css/ui.datepicker.css"/>
<script language="javascript" src="<?php echo @BASEURI; ?>
public/js/jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo @BASEURI; ?>
public/css/jquery.autocomplete.css"/>
<style type="text/css">
    table div{
        float:left;
        margin:3px auto 6px auto;
        padding:0px;
    }
    #search tr{
        line-height:120%;
        margin:0px;
        padding:0px;
    }

    select{
        height:23px;
    }
</style>
<script language="javascript" src="<?php echo @BASEURI; ?>
public/js/ui.datetimepicker.js"></script>
<table border="0" class="search" cellspacing="0" id="search">
    <tr>
        <td>&nbsp;</td>
        <td>
            <?php echo $this->_tpl_vars['systemLang']['selectGame']; ?>
:
            <input type="text" name="country" id="selectGame" value="<?php echo $this->_tpl_vars['games'][$this->_tpl_vars['search']['game_id']]; ?>
" />
            <input type="text" name="s[game_id]" id="gamess" value="<?php echo $this->_tpl_vars['search']['game_id']; ?>
" style="display: none"/>|
            <?php echo $this->_tpl_vars['systemLang']['selectStarTime']; ?>
:
            <input class="text" style="width:120px" type="text" name="s[date_stat]" id="cctime_s" readonly value="<?php echo $this->_tpl_vars['search']['date_stat']; ?>
"/>
            <?php echo $this->_tpl_vars['systemLang']['to']; ?>
 <input class="text" style="width:120px" type="text" name="s[date_end]" id="cctime_e" readonly value="<?php echo $this->_tpl_vars['search']['date_end']; ?>
"/>
            <!--选择渠道:
            <select name="s[channel]" onchange="gameChange(this.value)" id="s_channel">
                <option value=''>--选择渠道--</option>
                <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['channel'],'selected' => $this->_tpl_vars['search']['channel']), $this);?>

            </select>&nbsp;&nbsp; -->
            <input type="submit" name="submit" value="<?php echo $this->_tpl_vars['systemLang']['submit']; ?>
" class="button" />
        </td>
    </tr>
</table>
<table width="100%" border="0" class="adminlist" cellspacing="0">

    <thead>
    <tr>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_date']; ?>
">渠道名</th>
        <th title="总新增用户">总新增用户</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_new_user_num']; ?>
"><?php echo $this->_tpl_vars['systemLang']['new_user_num']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_old_user_num']; ?>
"><?php echo $this->_tpl_vars['systemLang']['old_user_num']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_app_activation']; ?>
"><?php echo $this->_tpl_vars['systemLang']['app_activation']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_dau']; ?>
"><?php echo $this->_tpl_vars['systemLang']['dau']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_pay_user_num']; ?>
"><?php echo $this->_tpl_vars['systemLang']['pay_user_num']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_payRate']; ?>
"><?php echo $this->_tpl_vars['systemLang']['payRate']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_newuser_pay_num']; ?>
"><?php echo $this->_tpl_vars['systemLang']['newuser_pay_num']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_adduser_pay_sum']; ?>
"><?php echo $this->_tpl_vars['systemLang']['adduser_pay_sum']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_adduserpayRate']; ?>
"><?php echo $this->_tpl_vars['systemLang']['adduserpayRate']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_apppay_sum']; ?>
"><?php echo $this->_tpl_vars['systemLang']['apppay_sum']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_arpu']; ?>
"><?php echo $this->_tpl_vars['systemLang']['arpu']; ?>
</th>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_arppu']; ?>
"><?php echo $this->_tpl_vars['systemLang']['arppu']; ?>
</th>
        <?php if ($this->_tpl_vars['isOneDay']): ?>
        <th title="<?php echo $this->_tpl_vars['systemLang']['title_oneDay']; ?>
"><?php echo $this->_tpl_vars['systemLang']['oneDay']; ?>
</th>
        <?php endif; ?>
    </tr>
    </thead>
    <tbody>
    <?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['info']):
?>
    <?php if ($this->_tpl_vars['info']['channel'] != 0): ?>
    <tr class="row0">
        <td><?php echo $this->_tpl_vars['channel'][$this->_tpl_vars['info']['channel']]; ?>
</td>
        <td><?php echo $this->_tpl_vars['info']['new_user_num']+$this->_tpl_vars['info']['old_user_num']; ?>
</td>
        <td><?php echo $this->_tpl_vars['info']['new_user_num']; ?>
</td>
        <td><?php echo $this->_tpl_vars['info']['old_user_num']; ?>
</td>
        <td><?php echo $this->_tpl_vars['info']['app_activation']; ?>
</td>
        <td><?php echo $this->_tpl_vars['info']['dau']; ?>
</td>
        <td><?php echo $this->_tpl_vars['info']['pay_user_num']; ?>
</td>
        <td><?php if ($this->_tpl_vars['info']['pay_user_num'] != 0 && $this->_tpl_vars['info']['dau'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['info']['pay_user_num']/$this->_tpl_vars['info']['dau']*100)) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f")); ?>
%<?php else: ?>0.00%<?php endif; ?></td>
        <td><?php echo $this->_tpl_vars['info']['newuser_pay_num']; ?>
</td>
        <td>￥<?php echo $this->_tpl_vars['info']['adduser_pay_sum']; ?>
</td>
        <td><?php if ($this->_tpl_vars['info']['newuser_pay_num'] != 0 && $this->_tpl_vars['info']['new_user_num'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['info']['newuser_pay_num']/$this->_tpl_vars['info']['new_user_num']*100)) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f")); ?>
%<?php else: ?>0.00%<?php endif; ?></td>
        <td>￥<?php echo $this->_tpl_vars['info']['apppay_sum']; ?>
</td>
        <td>￥<?php if ($this->_tpl_vars['info']['apppay_sum'] != 0 && $this->_tpl_vars['info']['dau'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['info']['apppay_sum']/$this->_tpl_vars['info']['dau'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f"));  else: ?>0.00<?php endif; ?></td>
        <td>￥<?php if ($this->_tpl_vars['info']['apppay_sum'] != 0 && $this->_tpl_vars['info']['pay_user_num'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['info']['apppay_sum']/$this->_tpl_vars['info']['pay_user_num'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f"));  else: ?>0.00<?php endif; ?></td>
        <?php if ($this->_tpl_vars['isOneDay']): ?>
        <td <?php if ($this->_tpl_vars['oneDay'][$this->_tpl_vars['info']['game_id']] != '0.00'): ?> style="background-color:#EEF6FD" <?php endif; ?>><?php echo $this->_tpl_vars['oneDay'][$this->_tpl_vars['info']['game_id']]; ?>
%</td>
        <?php endif; ?>
    </tr>
    <?php endif; ?>
    <?php endforeach; endif; unset($_from); ?>
    </tbody>
    <tfoot>
    <tr>
        <td><span style="color:#f86300">全部渠道</span></td>
        <td><?php echo $this->_tpl_vars['resultTot']['new_user_num']+$this->_tpl_vars['resultTot']['old_user_num']; ?>
</td>
        <td><?php echo $this->_tpl_vars['resultTot']['new_user_num']; ?>
</td>
        <td><?php echo $this->_tpl_vars['resultTot']['old_user_num']; ?>
</td>
        <td><?php echo $this->_tpl_vars['resultTot']['app_activation']; ?>
</td>
        <td><?php echo $this->_tpl_vars['resultTot']['dau']; ?>
</td>
        <td><?php echo $this->_tpl_vars['resultTot']['pay_user_num']; ?>
</td>
        <td><?php if ($this->_tpl_vars['resultTot']['pay_user_num'] != 0 && $this->_tpl_vars['resultTot']['dau'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['resultTot']['pay_user_num']/$this->_tpl_vars['resultTot']['dau'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f")); ?>
%<?php else: ?>0.00%<?php endif; ?></td>
        <td><?php echo $this->_tpl_vars['resultTot']['newuser_pay_num']; ?>
</td>
        <td>￥<?php echo $this->_tpl_vars['resultTot']['adduser_pay_sum']; ?>
</td>
        <td><?php if ($this->_tpl_vars['resultTot']['newuser_pay_num'] != 0 && $this->_tpl_vars['resultTot']['new_user_num'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['resultTot']['newuser_pay_num']/$this->_tpl_vars['resultTot']['new_user_num'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f")); ?>
%<?php else: ?>0.00%<?php endif; ?></td>
        <td>￥<?php echo $this->_tpl_vars['resultTot']['apppay_sum']; ?>
</td>
        <td>￥<?php if ($this->_tpl_vars['resultTot']['apppay_sum'] != 0 && $this->_tpl_vars['resultTot']['dau'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['resultTot']['apppay_sum']/$this->_tpl_vars['resultTot']['dau'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f"));  else: ?>0.00<?php endif; ?></td>
        <td>￥<?php if ($this->_tpl_vars['resultTot']['apppay_sum'] != 0 && $this->_tpl_vars['resultTot']['pay_user_num'] != 0):  echo ((is_array($_tmp=$this->_tpl_vars['resultTot']['apppay_sum']/$this->_tpl_vars['resultTot']['pay_user_num'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f"));  else: ?>0.00<?php endif; ?></td>
    </tr>
    </tfoot>
</table>
</form>
<script language="javascript">

    $("#selectGame").autocomplete("/game_manager/search",{
        max: 10,//显示数据条数
        minChars:1, //在触发autoComplete前用户至少需要输入的字符数 默认为0 在输入框内双击或者删除输入框内内容时显示列表
        matchCase:false,
        matchContains:true,
        //matchContains: "word",//只要包含输入字符就会显示提示
        autoFill:false,//自动填充输入框
        scroll:false,//不显示滚动条
        parse: function(data){
            var rows = [];
            var d = eval(data);
            for(var i=0; i<d.length; i++){
                rows[rows.length] = {
                    data:d[i], //每条数据对象
                    value:d[i].name, //与输入的值比较的数据
                    result:d[i].name  //选中的实际数据
                };
            }
            return rows;
        },
        formatItem: function(row, i, max) {
            console.log(row);
            return   "<span class='ac_name'>"+row.name + "</span>";
        },
        formatMatch: function(row, i, max) {
            return row.name + " " + row.game_id;
        },
        formatResult: function(row) {
            return row.name;
        }
    }).result(function(event, row, formatted) {
        $("#gamess").val(row.game_id);
    });

    $('#cctime_s').datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"",maxDate:"+1d"});
    $('#cctime_e').datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"",maxDate:"+1d"});
</script>